﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using StateGrid.MDBservice;

namespace StateGrid.ZGCG
{
    /// <summary>
    ///ZGCG_PM 的摘要说明
    /// </summary>
    public class ZGCG_PM : PM
    {
        ///<summary>
        ///ID编号
        ///</summary>
        public int id
        {
            get;
            set;
        }

        /// <summary>
        ///分类编码
        /// </summary>
        public String flbm
        {
            get;
            set;
        }

        /// <summary>
        /// 成果名称
        /// </summary>
        public String cgmc
        {
            get;
            set;
        }

        /// <summary>
        /// 成果编号
        /// </summary>
        public String cgbh
        {
            get;
            set;
        }

        /// <summary>
        /// 完成人
        /// </summary>
        public String wcr
        {
            get;
            set;
        }

        /// <summary>
        /// 完成单位
        /// </summary>
        public String wcdw
        {
            get;
            set;
        }

        /// <summary>
        /// 单位地址
        /// </summary>
        public String dwdz
        {
            get;
            set;
        }

        /// <summary>
        /// 邮政编码
        /// </summary>
        public String yzbm
        {
            get;
            set;
        }

        /// <summary>
        /// 单位电话
        /// </summary>
        public String dwdh
        {
            get;
            set;
        }

        /// <summary>
        /// 成果简介
        /// </summary>
        public String cgjj
        {
            get;
            set;
        }

        /// <summary>
        /// 中文主题词
        /// </summary>
        public String zwztc
        {
            get;
            set;
        }

        /// <summary>
        /// 研究起止时间
        /// </summary>
        public String yjqzsj
        {
            get;
            set;
        }

        /// <summary>
        /// 国图分类
        /// </summary>
        public String gtfl
        {
            get;
            set;
        }

        /// <summary>
        /// 成果类别
        /// </summary>
        public String cglb
        {
            get;
            set;
        }

        /// <summary>
        /// 成果水平
        /// </summary>
        public String cgsp
        {
            get;
            set;
        }

        /// <summary>
        /// 鉴定部门
        /// </summary>
        public String jdbm
        {
            get;
            set;
        }

        /// <summary>
        /// 鉴定日期
        /// </summary>
        public String jdrq
        {
            get;
            set;
        }

        /// <summary>
        /// 立项或获奖
        /// </summary>
        public String lxhhj
        {
            get;
            set;
        }

        /// <summary>
        /// 发布单位
        /// </summary>
        public String fbdw
        {
            get;
            set;
        }
        /// <summary>
        /// 资料来源
        /// </summary>
        public String zlly
        {
            get;
            set;
        }
        /// <summary>
        /// 发布年份
        /// </summary>
        public int fbnf
        {
            get;
            set;
        }
        /// <summary>
        /// 来源编号
        /// </summary>
        public String lybh
        {
            get;
            set;
        }
        /// <summary>
        /// 行业代码
        /// </summary>
        public String hydm
        {
            get;
            set;
        }

        /// <summary>
        /// 行业名称
        /// </summary>
        public String hymc
        {
            get;
            set;
        }

        /// <summary>
        /// 专利授权
        /// </summary>
        public String zlsq
        {
            get;
            set;
        }
        /// <summary>
        /// 开放
        /// </summary>
        public Boolean kf
        {
            get;
            set;
        }
        /// <summary>
        /// 更行日期
        /// </summary>
        public DateTime gxrq
        {
            get;
            set;
        }

        public String dlr
        {
            get;
            set;
        }

        public ZGCG_PM()
        {
            //
            //TODO: 在此处添加构造函数逻辑
            //
        }
        public override string ToString()
        {
            String ret;
            ret = "[分类编码]" + this.flbm + "[成果编号]" + this.cgbh + " [成果名称]" + this.cgmc;
            return ret;
        }

        public override string AllContent()
        {
            String ret = "('" + id + "','" + flbm + "','" + cgbh + "','" + cgmc + "','" + wcr + "','" + wcdw + "','" + dwdz + "','" + yzbm + "','" + dwdh + "','" + cgjj + "','" + zwztc + "','" + yjqzsj + "','" + gtfl + "','" + cglb + "','" + cgsp + "','" + jdbm + "','" + jdrq + "','" + lxhhj + "','" + fbdw + "','" + zlly + "','" + fbnf + "','" + lybh + "','" + hydm + "','" + hymc + "','" + zlsq + "','" + kf + "','" + gxrq + "','" + dlr + "')";
            return ret;
        }

        public override void fillEmptyStringAsNull()
        {
            String temp = "NULL";
            if (String.Empty.Equals(this.flbm)) flbm = temp;
            if (String.Empty.Equals(this.cgmc)) cgmc = temp;
            if (String.Empty.Equals(this.cgbh)) cgbh = temp;
            if (String.Empty.Equals(this.wcr)) wcr = temp;
            if (String.Empty.Equals(this.wcdw)) wcdw = temp;
            if (String.Empty.Equals(this.dwdz)) dwdz = temp;
            if (String.Empty.Equals(this.yzbm)) yzbm = temp;
            if (String.Empty.Equals(this.dwdh)) dwdh = temp;
            if (String.Empty.Equals(this.cgjj)) cgjj = temp;
            if (String.Empty.Equals(this.zwztc)) zwztc = temp;
            if (String.Empty.Equals(this.yjqzsj)) yjqzsj = temp;
            if (String.Empty.Equals(this.gtfl)) gtfl = temp;
            if (String.Empty.Equals(this.cglb)) cglb = temp;
            if (String.Empty.Equals(this.cgsp)) cgsp = temp;
            if (String.Empty.Equals(this.jdbm)) jdbm = temp;
            if (String.Empty.Equals(this.jdrq)) jdrq = temp;
            if (String.Empty.Equals(this.lxhhj)) lxhhj = temp;
            if (String.Empty.Equals(this.fbdw)) fbdw = temp;
            if (String.Empty.Equals(this.zlly)) zlly = temp;
            if (String.Empty.Equals(this.lybh)) lybh = temp;
            if (String.Empty.Equals(this.hydm)) hydm = temp;
            if (String.Empty.Equals(this.hymc)) hymc = temp;
            if (String.Empty.Equals(this.zlsq)) zlsq = temp;
            if (String.Empty.Equals(this.dlr)) dlr = temp;
        }

        public override void eraseNullInEmptyString()
        {
            String temp = "NULL";
            if (temp.Equals(this.flbm)) flbm = String.Empty;
            if (temp.Equals(this.cgmc)) cgmc = String.Empty;
            if (temp.Equals(this.cgbh)) cgbh = String.Empty;
            if (temp.Equals(this.wcr)) wcr = String.Empty;
            if (temp.Equals(this.wcdw)) wcdw = String.Empty;
            if (temp.Equals(this.dwdz)) dwdz = String.Empty;
            if (temp.Equals(this.yzbm)) yzbm = String.Empty;
            if (temp.Equals(this.dwdh)) dwdh = String.Empty;
            if (temp.Equals(this.cgjj)) cgjj = String.Empty;
            if (temp.Equals(this.zwztc)) zwztc = String.Empty;
            if (temp.Equals(this.yjqzsj)) yjqzsj = String.Empty;
            if (temp.Equals(this.gtfl)) gtfl = String.Empty;
            if (temp.Equals(this.cglb)) cglb = String.Empty;
            if (temp.Equals(this.cgsp)) cgsp = String.Empty;
            if (temp.Equals(this.jdbm)) jdbm = String.Empty;
            if (temp.Equals(this.jdrq)) jdrq = String.Empty;
            if (temp.Equals(this.lxhhj)) lxhhj = String.Empty;
            if (temp.Equals(this.fbdw)) fbdw = String.Empty;
            if (temp.Equals(this.zlly)) zlly = String.Empty;
            if (temp.Equals(this.lybh)) lybh = String.Empty;
            if (temp.Equals(this.hydm)) hydm = String.Empty;
            if (temp.Equals(this.hymc)) hymc = String.Empty;
            if (temp.Equals(this.zlsq)) zlsq = String.Empty;
            if (temp.Equals(this.dlr)) dlr = String.Empty;
        }
    }
}